<#include "../common/layout.ftl"/>
<@layout>
<div class="well" style="height:30px">
	<form method="post" action="/categoryorder/parkList" class="form-inline">
		<span class="label label-success">泊车订单</span>
		<input type="text" class="input-medium" style="height: 26" placeholder="订单号" name="id"/>
		<button type="submit" class="btn btn-primary"><i class="icon-search icon-white"></i>查询</button>
		<button type="button" class="btn btn-info" onclick="javascript:history.back();">返回</button>
		<a class="btn btn-primary btn-small" href="/order/cancelList">订单总数(${totalNum})</a>
	</form>
</div>
<div class="well">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
			<th>单号</th>
			<th>订单城市</th>
			<th>订单种类</th>
			<th>订单状态</th>
			<th>泊车地点</th>
			<th>到达时间</th>
			<th>回程时间</th>
			<th>回程航班</th>
			<th>车牌号码</th>
			<th>颜色</th>
			<th>品牌</th>
			<th>联系人</th>
			<th>联系电话</th>
			<th>下单时间</th>
			<th>发布时间</th>
			<th>备注</th>
			<th>操作</th>
		  </tr>
		</thead>
		<tbody>
		<#list page.list as order>
		  <tr>
		    <td>${order.id}</td>
		    <td>${order.city}</td>
			<td>
			   <#if order.order_category_type ??>
					<#list session.orderTypeMapList as orderType>
		    			<#if orderType.value == order.order_category_type>
		    			  ${orderType.name}
		    			</#if>
		    		</#list>
	    	    </#if>
			</td>
			<td>
			 <#list session.orderStatusTypeArray as orderStatusType>
			 	<#if orderStatusType.orderStatus == order.order_state>
			 		${orderStatusType.orderName}
			 	</#if>
			 </#list>
			</td>
			<td>
				<#if order.startpoint??>
					${order.startpoint!""}
				<#else>
			 		${order.cur_station!" "}
			 	</#if>
			</td>
			<td>
			 ${order.point_time?string("yyyy年MM月dd日HH时mm分ss秒")}
			</td>
			<td>
			   <#if order.wish_finish_time??>
			 		${order.wish_finish_time?string("yyyy年MM月dd日HH时mm分ss秒")}
			   </#if>
			</td>
			<td>
			 ${order.flight_no!""}
			</td>
			<td>
			 ${order.card_no!" "}
			</td>
			<td>
			 ${order.send_no!" "}
			</td>
			<td>
			 ${order.engine_no!" "}
			</td>
			<#if order.member_id == 0>
				<td>
				  ${order.real_name!""}
				</td>
				<td>
				  ${order.cell_phone!""}
				</td>
		  	<#else>
				<td>
				  ${order.real_name2!""}
				</td>
				<td>
				  ${order.cell_phone2!""}
				</td>
		  	</#if>
			<td>
			<#if order.create_time??> 
			 ${order.create_time?string("yyyy年MM月dd日HH时mm分ss秒") }  
			</#if>
			</td>
			<td>
			 <#if order.publish_time??> 
			 ${order.publish_time?string("yyyy年MM月dd日HH时mm分ss秒") }  
			</#if>
			</td>
			</td>
			<td>
			 ${order.remark!" "}
			</td>
			<td nowrap>
			     <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager' || session.userRole == 'customerCenter'>
				 	<a class="btn btn-success" href="/order/assignmentDriver/${order.id}" target="_blank" >派单</a>
				 </#if>
				 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager' || session.userRole == 'customerCenter'>
				 	<a class="btn btn-success" href="/order/addressupdate/${order.id}"><i class="icon-leaf icon-white"></i> 修改泊车地点</a>
				 </#if>
				 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager' || session.userRole == 'customerCenter'>
				 	<a class="btn btn-success" href="/order/cancelNotAccept/${order.id}"  >取消</a>
				 </#if>
				 <#if session.userRole == 'admin' || session.userRole == 'brandManager' || session.userRole == 'middleManager' || session.userRole == 'customerCenter'>
				 	<a class="btn btn-success" href="/order/assignment/${order.id}" >重发</a>
				 </#if>
				  <#if (order.timeDiffe?exists)>
				  <#if (order.timeDiffe>=3)>
			      <embed id = "soundControl1"  src="/sound.mp3"  mastersound hidden = "true"  loop ="false"  autostart = "true"></embed>
			      </#if>
			      </#if>
			</td>
			
			
		  </tr>
		</#list>
		</tbody>
	</table>
	<#include "../common/paginate.ftl" />
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/categoryorder/breakruleList/" />
</div>

</@layout>